import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../components/home'
import search from '../components/search'
import cart from '../components/cart'
import account from '../components/account'
import accountOrderList from '../components/account_order_list'
import accountOrderInfo from '../components/account_order_info'
import checkout from '../components/checkout'
import login from '../components/login'
import addressEdit from '../components/address-edit'
import address from '../components/address'
import checkout_address from '../components/checkout-address'
import wx_qrcode from '../components/pay/wx_qrcode'
import pay from '../components/pay/pay'
import goods from '../components/goods'
import category from '../components/category'
import live from '../components/live'



import test from '../components/test'

Vue.use(VueRouter);


var router = new VueRouter({
    routes: [
        {
            path: '/',
            component: home,

        },
        {
            path:'/wechat_redirect',
            component:home
        },
        {
            path: '/search',
            component: search,

        },
        {
            path: '/cart',
            component: cart,

        },
        {
            path: '/account',
            component: account,

        },
        {
            path: '/account/order_list',
            component: accountOrderList,

        },
        {
            path: '/account/order_list/:status',
            component: accountOrderList,

        },
        {
            path: '/account/order/:order_id',
            component: accountOrderInfo,

        },
        {
            path: '/login',
            component: login,

        },
        {
            path: '/checkout',
            component: checkout,

        },
        // {
        //     path: '/checkout/goods/:goods_id/number/:number',
        //     component: checkout,
        //
        // },
        {
            path: '/pay/:order_id',
            component: pay,

        },
        {
            path: '/address-edit',
            component: addressEdit,

        },
        {
            path: '/address-edit/:address_id',
            component: addressEdit,

        },
        {
            path: '/checkout/address-edit/:address_id',
            component: addressEdit,

        },
        {
            path: '/account/address-edit/:address_id',
            component: addressEdit,

        },
        {
            path: '/address',
            component: address,
        },
        {
            path: '/account/address',
            component: address,

        },
        {
            path: '/checkout/address',
            component: checkout_address,
        },
        {
            path: '/pay/wx_qrcode',
            component: wx_qrcode,
        },
        {
            path: '/goods/:goods_id',
            component: goods,
        },

        {
            path: '/category',
            component: category,
        },

        {
            path: '/category/path/:path_id',
            component: search,
        },

        {
            path: '/live',
            component: live,
        },


        // 测试完毕 删除
        {
            path: '/test',
            component: test,
        }
    ]
});

export default router;